<?php session_start();
if (isset($_SESSION['lang']))
    require_once "./language_files/dismiss_" . $_SESSION['lang'] . ".php";
else
    require_once "./language_files/dismiss_en.php";
//opening connection
require_once 'functions.php';
if (isset($_POST['paperID']) && isset($_POST['confID'])) {
    $paper_id = $_POST['paperID'];
    $conference_id = $_POST['confID'];
    $organizer_id = $_SESSION['member_id'];
    $query = mysql_query("SELECT `status`
           FROM `paper`p
           WHERE`paper_id`='$paper_id'");
    $myrow = mysql_fetch_assoc($query);
    $status = $myrow["status"];
    if ($status != "deleted") {
        $query2 = mysql_query(
                "
                      Update paper
                      SET `deleted` = 1
                     Where `paper_id`='$paper_id' AND `conference_id`= '$conference_id'
                "
                ) or die(mysql_error());

        $query4 = mysql_query("
                      Update paper
                      SET `status` = 'dismissed'
                     Where `paper_id`='$paper_id' AND `conference_id`= '$conference_id'
") or die(mysql_error());
        echo $lang['message_1'];
    } else {
        echo $lang['message_2'];
    }
} else {
    echo "no data";
}
mysql_close();
?>
